﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

#if net35

namespace System.IO
{
	public static class StreamEx
	{
		public static void CopyTo(this Stream source, Stream destination) {
			var buffer = new byte[1024];
			int read = 0;
			while((read = source.Read(buffer, 0, buffer.Length)) != 0){
				destination.Write(buffer, 0, read);
			}
		}
	}
}

#endif